{% extends "entries/base.html" %}
{% block content %}
    <form method="post">
        {% csrf_token %}
        {{ form.as_p }}
        <input type="submit" value="Save">
    </form>
    {% if entry %}
        <a href="{% url 'entry-detail' entry.id %}">
            <button>Cancel</button>
        </a>
    {% else %}
        <a href="{% url 'entry-list' %}">
            <button>Cancel</button>
        </a>
    {% endif %}
{% endblock content %}
